1. Field of the Invention
The present invention relates to computer graphics systems, and more specifically to a method and apparatus implemented in a digital display unit of a computer system for determining a source graphics mode using which a received analog display signal was generated.
2. Related Art
Digital display units (e.g., flat panel monitors) are often used to display images encoded in an analog display signal. A signal in SVGA format generated by a graphics controller circuit of a computer system is an example of such an analog display signal. An analog display signal generally includes display data signal and corresponding synchronization signals. The display data signal identifies a color intensity for each point of an image and the synchronization signals provide a time reference such that each portion of the display data signal can be correlated with a corresponding portion of the image.
In general, an analog display signal includes multiple frames, with each frame corresponding to an image. Each frame in turn includes multiple horizontal lines. The synchronization signals typically include horizontal and vertical synchronization signals to indicate transitions to next horizontal line and next frame respectively in the associated display data signal.
To reproduce the encoded images, a digital display unit needs to operate consistent with an encoding scheme used by a graphics source (e.g., graphics controller circuit of a computer system). The encoding scheme is typically characterized by display signal parameters, and a given set of values for the display signal parameters defines a "source mode". For example, each source mode may be characterized by the refresh rate (number of frames encoded in the display signal per second), the number of lines in each frame, the number of points forming each horizontal line, among others.
As an illustration, the alphanumeric mode of the VGA standard may have a refresh rate of 70 Hertz (i.e., number of frames per second), with each frame including 400 horizontal lines (source image height) and each horizontal line including 720 pixel data element samples (source image width). The need for a digital display unit to operate consistent with the source mode for proper reproduction can be appreciated by considering the manner in which an example analog display signal is generated.
In a typical situation, a source image is represented by a plurality of pixel data elements at a graphics source (e.g., graphics controller circuit of a computer system), with each pixel data element representing a point (pixel position) on the image. In the case of the alphanumeric mode of the VGA standard, a source image may be stored as 720 (source image width).times.400 (source image height) pixel data elements. A graphics source generates an analog display signal with image frames by converting each pixel data element into corresponding display data signal. A digital to analog converter (DAC) and a source clock (dot clock) are typically used for such a conversion.
As the analog display signal is typically designed to operate in conjunction with analog display monitors which need time for horizontal retrace while scanning horizontal lines of the analog display screen, the total number of pixels (HTOTAL) in each line is typically more than the source image width. For example, for the alphanumeric mode of the VGA standard, HTOTAL equals 900 pixels even though the source image width is 720. Similarly, VTOTAL representing the number of vertical lines in each frame is more than the source image height to allow for vertical retrace.
In general, a digital display unit needs to sample a received analog display signal to recover the pixel data elements from which the display signal was generated. For accurate recovery, the number of samples taken in each horizontal line needs to equal HTOTAL. Each horizontal line is usually identified by successive horizontal synchronization pulses. If the number of samples taken is not equal to HTOTAL, the sampling may be inaccurate and display artifacts may results as described with reference to FIG. 1.
FIG. 1 is a diagram of the amplitude of a display signal as a function of time illustrating typical characteristics of analog display signals. Typically, a display signal portion for each pixel data element has a settling period (shown as 110-A and 110-B) before the steady-state (150-A and 150-B respectively) is reached. The steady-state represents the value (e.g., color intensity) of the pixel data element in a source image. For an accurate reproduction of the source image pixel data values, a digital display unit needs to sample a received display signal during a steady-state. Hence, a digital display unit may need to sample each horizontal line of a received display signal a number of times equal to HTOTAL.
Therefore, a digital display unit typically needs the HTOTAL for accurate sampling of the received analog display signal. There are other display signal parameters which a digital display unit may need for accurate sampling of a received display signal. The number of colors, the horizontal start position (representing the pixel number in each horizontal line from which the source image data starts) and vertical start position (representing the line number from which the source image data starts) are examples of some of the other display signal parameters.
From the above description, it should be appreciated that a digital display unit often needs to determine a source mode in which a received analog display signal is generated. Often, a digital display unit measures some of display signal parameters (which can be readily measured), and determines others according to pre-set configurations. For example, a digital display unit may store a table (or any other data structure) with the display signal parameter values associated with each of a predetermined set of potential source modes. Some of the signal parameters such as VTOTAL, synchronization signal polarities, the time for receiving each horizontal line may be measured. One or more of these measured parameter values is compared with corresponding parameter values of a potential source mode. Once a match is detected in the comparison, the signal is determined to have been generated according to the corresponding source mode.
Many parameter values of a source mode are often defined by standards (e.g., VGA, SVGA) and the pre-stored values generally correspond to such values defined by the standards. However, the measured values can differ at least in minor respects from the pre-stored values. For example, given the same standard for a source mode, different manufacturers can implement the standard with slightly different display signal parameter values. Further variations may be introduced due to manufacturing imperfections.
In addition, the physical characteristics of the hardware (e.g., clock or DAC) at a graphics source can drift with the ambient temperature and the age of the display unit, leading to further variations from the pre-stored values. Furthermore, some digital display units may employ discrete measurement techniques to measure the source parameters. For example, the time for receiving a horizontal line may be measured in terms of the number of pulses (or periods) of a clock employed in a display unit. Assuming a 10 MHZ clock is employed, the measurement error can be as high as 200 nano-seconds.
Due to the deviation generally to be expected in the measured display signal parameter values from the pre-stored display signal parameter values, a digital display unit may associate a tolerance level with each display signal parameters. If the computed difference of a measured value and a pre-stored value is withing the tolerance level, a match may be deemed to exist.
In general, a large tolerance value leads to a determination of an incorrect match (or determination of more than one match). As a result, a source mode with substantially different display signal parameter values may be selected, and the images encoded in a received display signal may not be accurately displayed. On the other hand, if the tolerance level is too small, even if an acceptable source mode having insubstantial deviation of values is pre-stored in a digital display unit, the acceptable mode may not be selected.
Therefore, what is needed is a method and apparatus which enables a digital display unit to accurately determine an optimal source mode in the presence of deviations of source mode parameter values from any pre-stored values associated with the pre-stored modes.